# class Phone:
#     IMEI = None         # 序列号
#     producer = "cx"     # 厂商
#
#     def call_by_5g(self):
#         print("使用5g网络进行通话")
#
# class Myphone(Phone):
#     producer = "rocky"          # 复写父类属性
#
#     def call_by_5g(self):
#         print("开启CPU单核模式，确保通话的时候省电")     # 复写父类方法
#         print("使用5g网络进行通话")
#         print("关闭CPU单核模式，确保性能")
#
# phone = Myphone()
# phone.call_by_5g()


class Phone:
    IMEI = None  # 序列号
    producer = "cx"  # 厂商

    def call_by_5g(self):
        print("使用5g网络进行通话")


class Myphone(Phone):
    producer = "rocky"  # 复写父类属性

    def call_by_5g(self):
        print("开启CPU单核模式，确保通话的时候省电")  # 复写父类方法
        # way1
        # print(f"父类的厂商是：{Phone.producer}")
        # Phone.call_by_5g(self)
        # way2
        print(f"父类的厂商是：{super().producer}")
        super().call_by_5g()
        print("关闭CPU单核模式，确保性能")


phone = Myphone()
phone.call_by_5g()
print(phone.producer)